package can;import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean
@SessionScoped
public class UploadBean {
	private String results = "";
	
	private String yearTags;
	private String manTags;
	private String typeTags;
	private String natTags;
	
	private String otherTags;
	
	//Check this out, yo:
	//Will dynamically use fields together with document being submitted to populate the list fields for an object located in file-system
	//then write said information to text somewhere on the server so it can be read and the in-memory description of all files can be
	//created once again.  This will be good for small time databases but potentially bad for larger ones.
	
	
	
	//input fields
	private String someInputData;  //TODO: Probably obsolete 

	public String getYearTags() {
		return yearTags;
	}
	public void setYearTags(String yearTags) {
		this.yearTags = yearTags;
	}

	public String getManTags() {
		return manTags;
	}

	public void setManTags(String manTags) {
		this.manTags = manTags;
	}

	public String getTypeTags() {
		return typeTags;
	}

	public void setTypeTags(String typeTags) {
		this.typeTags = typeTags;
	}

	public String getNatTags() {
		return natTags;
	}

	public void setNatTags(String natTags) {
		this.natTags = natTags;
	}

	public String getOtherTags() {
		return otherTags;
	}

	public void setOtherTags(String otherTags) {
		this.otherTags = otherTags;
	}

	//action method - does the operation
	public void doUpload() {
		//parse all fields and construct the operation command
		
		//call RequestHandler with proper parameters
		results = RequestHandler.upload();
	}
	
	//accessors and mutators
	public String getResults() {
		return results;
	}
	
	public void setSomeInputData(String someInputData) {
		this.someInputData = someInputData;
	}
}
